package webApiEntities.Requests;

import java.util.ArrayList;

import entities.*;
import webApiEntities.MessageType;
import webApiEntities.Responses.MovieResponseMessage;
import webApiEntities.Responses.IResponseMessage;

public class MovieRequestMessage extends BasicRequestMessage {

	public MovieRequestMessage(ArrayList<Class<?>> byType,
			ArrayList<ArrayList<Entity>> byObj) {
		super(MessageType.Movie, byType, byObj);
	}

	public IResponseMessage HandleRequest() {
		// VLN: TODO: here need to be the search in DB for the requested movie
		// VLN: until that i will return always the same 2 movies.
		_moviemeBL.get(Movie.class, null, null);
		Movie movie1 = new Movie("Movie1");
		Movie movie2 = new Movie("Movie2");
		
		ArrayList<Entity> requestedMovies = new ArrayList<Entity>();
		requestedMovies.add(movie1);
		requestedMovies.add(movie2);
		
		MovieResponseMessage responseMessage = new MovieResponseMessage(requestedMovies);
		
		return responseMessage;
	}
	
}
